snapshot: Change how gtk_snapshot_push/pop works
authorBenjamin Otte <otte@redhat.com>
Tue, 13 Dec 2016 01:33:15 +0000 (02:33 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 20 Dec 2016 17:01:10 +0000 (18:01 +0100)
commit02131d590e2f4bdf9d2f487e619a3f08c1cf178e
tree0a2dd4fb6522b9d75ae31b75d6c11fe95fe0c1df
parentca80e9decf49acb042984bc07348d2fc93c03997
snapshot: Change how gtk_snapshot_push/pop works

Instead of appending a container node and adding the nodes to it as they
come in, we now collect the nodes until gtk_snapshot_pop() is called and
then hand them out in a container node.

The caller of gtk_snapshot_push() is then responsible for doing whatever
he wants with the created node.

Another addigion is the keep_coordinates flag to gtk_snapshot_push()
which allows callers to keep the current offset and clip region or
discard it. Discarding is useful when doing transforms, keeping it is
useful when inserting effect nodes (like the ones I'm about to add).
docs/reference/gsk/gsk4-sections.txt
gsk/gskrendernode.h
gsk/gskrendernodeimpl.c
gtk/gtkrendericon.c
gtk/gtksnapshot.c
gtk/gtksnapshot.h
gtk/gtksnapshotprivate.h